Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #2

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Development #2

wants to merge 6 commits into from

Conversation

eddogola
Copy link

I have incorporated your suggestions. Kindly let me know if I'm missing anything.

Eddy Ogola Onyango added 6 commits June 15, 2022 15:43
Implement all core features.
All tests, except for stretch features, passing.
and inserts to correct spot in HTML
 got right number of classes; all tests are now passing
@ajmajma
Copy link

ajmajma commented Jun 17, 2022

1 suggestion with git (no need to change anything with this comment as well). With git you can push more commits, or amend work to the original PR where Peter reviewed. Doing this will provide a clean history in git to track your work.

Copy link

@ajmajma ajmajma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few small comments. Great job!

addTotalsRow(reportCardTableElement);
addGpaRow(reportCardTableElement);
addUpStudentCredits(reportCardTableElement);
calculateSemesterGpa(reportCardTableElement);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job in breaking these down into individual responsibilities!

@@ -213,7 +262,7 @@ function openDropdown(dropdownElement) {
*
*/
function updateDropdownLabel() {
// code goes here
dropdownLabelElement.innerHTML = semester;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit - semester is in an outer scope. You can avoid future confusion by passing it directly to this function.

@@ -266,9 +340,18 @@ function addUpStudentCredits(reportCardTableElement) {
*/

function calculateSemesterGpa(reportCardTableElement) {
// code goes here
let grades = Array.from(reportCardTableElement.querySelectorAll('.gpa')).filter((grade) => grade.innerHTML in gpaPointsLookup);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gpaPointsLookup is outer scoped as well. This will work fine for your scenario, but you can save yourself some future debugging pain by explicitly passing all the variables you need for your functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants